<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK C++ API Reference: JCClient类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK C++ API Reference
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_j_c_client-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">JCClient类 参考<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html">登录模块</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_j_c_client_8h_source.html">JCClient.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:af2e726707f53bb0712b5876ca807344f"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#af2e726707f53bb0712b5876ca807344f">getServerAddress</a> ()=0</td></tr>
<tr class="separator:af2e726707f53bb0712b5876ca807344f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf9a101b1cb0744d7857570fd97847af"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#adf9a101b1cb0744d7857570fd97847af">setDisplayName</a> (const char *displayName)=0</td></tr>
<tr class="separator:adf9a101b1cb0744d7857570fd97847af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a075736b286c05ff52cc635774b456fba"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#a075736b286c05ff52cc635774b456fba">getDisplayName</a> ()=0</td></tr>
<tr class="separator:a075736b286c05ff52cc635774b456fba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2c63b8bae1b189b3b6e09bf8d3058b9"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#ae2c63b8bae1b189b3b6e09bf8d3058b9">getUserId</a> ()=0</td></tr>
<tr class="separator:ae2c63b8bae1b189b3b6e09bf8d3058b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c45eac84e61df792573e9a1431c2c1d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga5c6824014f5c55e65de4010f908e1eaa">JCClientState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#a9c45eac84e61df792573e9a1431c2c1d">getState</a> ()=0</td></tr>
<tr class="separator:a9c45eac84e61df792573e9a1431c2c1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca4d5642f60d6842ea739501821e4f42"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#aca4d5642f60d6842ea739501821e4f42">getAppkey</a> ()=0</td></tr>
<tr class="separator:aca4d5642f60d6842ea739501821e4f42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42545af6e531d52d03ea6cc67c4d2936"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#a42545af6e531d52d03ea6cc67c4d2936">getCreateParam</a> ()=0</td></tr>
<tr class="separator:a42545af6e531d52d03ea6cc67c4d2936"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a235b867cf189da9e767eeb2bd0bca9de"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#a235b867cf189da9e767eeb2bd0bca9de">getLoginParam</a> ()=0</td></tr>
<tr class="separator:a235b867cf189da9e767eeb2bd0bca9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a580669b0424bf7e22db3ccbe059dddba"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> (const char *userId, const char *password, const char *serverAddress, <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> *loginParam)=0</td></tr>
<tr class="separator:a580669b0424bf7e22db3ccbe059dddba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abac015a13078c84b06afac69dcd392ff"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_client.html#abac015a13078c84b06afac69dcd392ff">logout</a> ()=0</td></tr>
<tr class="separator:abac015a13078c84b06afac69dcd392ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>用于初始化sdk以及登录 Juphoon Cloud 平台 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="aca4d5642f60d6842ea739501821e4f42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca4d5642f60d6842ea739501821e4f42">&#9670;&nbsp;</a></span>getAppkey()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* JCClient::getAppkey </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取Appkey</p>
<p>返回的Appkey是由 <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga2d6fc4f203884536ff69bfe0e0ed300f">createJCClient</a> 方法传入的</p>
<dl class="section return"><dt>返回</dt><dd>Appkey </dd></dl>

</div>
</div>
<a id="a42545af6e531d52d03ea6cc67c4d2936"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42545af6e531d52d03ea6cc67c4d2936">&#9670;&nbsp;</a></span>getCreateParam()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a>* JCClient::getCreateParam </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取创建参数</p>
<p>返回的创建参数就是用户在调用 <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga2d6fc4f203884536ff69bfe0e0ed300f">createJCClient</a> 方法时传入的 <a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a> 参数，若用户在调用 <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga2d6fc4f203884536ff69bfe0e0ed300f">createJCClient</a> 方法时， <a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a> 传入了 NULL，则返回默认的 <a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a> 对象</p>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="class_j_c_client_create_param.html">JCClientCreateParam</a> 创建参数对象 </dd></dl>

</div>
</div>
<a id="a075736b286c05ff52cc635774b456fba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a075736b286c05ff52cc635774b456fba">&#9670;&nbsp;</a></span>getDisplayName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* JCClient::getDisplayName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取自己的昵称</p>
<dl class="section return"><dt>返回</dt><dd>自己的昵称 </dd></dl>

</div>
</div>
<a id="a235b867cf189da9e767eeb2bd0bca9de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a235b867cf189da9e767eeb2bd0bca9de">&#9670;&nbsp;</a></span>getLoginParam()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a>* JCClient::getLoginParam </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取登录参数</p>
<p>返回的登录参数就是用户在调用 <a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> 方法时传入的 <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> 参数，若用户在调用 <a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> 方法时， <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> 传入了 NULL，则将返回默认的 <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> 对象。<br  />
 需要注意的是只有用户状态为登录中或已登录时才能获取到值，其他状态将返回 NULL</p>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> 登录参数对象 </dd></dl>

</div>
</div>
<a id="af2e726707f53bb0712b5876ca807344f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2e726707f53bb0712b5876ca807344f">&#9670;&nbsp;</a></span>getServerAddress()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* JCClient::getServerAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取登录服务器地址</p>
<p>返回的登录地址就是用户在调用 <a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> 方法时传入的 serverAddress 参数，若用户在调用 <a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> 方法时，serverAddress 传入了 NULL 或者 ""，将返回默认地址 <a href="http:cn.router.justalkcloud.com:8080">http:cn.router.justalkcloud.com:8080</a>。<br  />
 需要注意的是只有用户状态为登录中或已登录才能获取到值，其他状态将返回空字符串</p>
<dl class="section return"><dt>返回</dt><dd>登录服务器地址 </dd></dl>

</div>
</div>
<a id="a9c45eac84e61df792573e9a1431c2c1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c45eac84e61df792573e9a1431c2c1d">&#9670;&nbsp;</a></span>getState()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga5c6824014f5c55e65de4010f908e1eaa">JCClientState</a> JCClient::getState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取当前登录状态</p>
<dl class="section return"><dt>返回</dt><dd>当前登录状态：<ul>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga5c6824014f5c55e65de4010f908e1eaaa5a6b582ba8275e39567b419ce05b7860">JCClientStateNotInit</a> : 未初始化</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga5c6824014f5c55e65de4010f908e1eaaaa455b750bbf9c4d8e2162eb29255c67f">JCClientStateIdle</a> : 未登录</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga5c6824014f5c55e65de4010f908e1eaaa8346c85a19f76aae4e61756dd83c761d">JCClientStateLogining</a> : 登录中</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga5c6824014f5c55e65de4010f908e1eaaae234aaca0d7d17f56ac4646c1ce4c0b7">JCClientStateLogined</a> : 登录成功</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga5c6824014f5c55e65de4010f908e1eaaa5bdd4f3d018ad3132fa241156101d2e3">JCClientStateLogouting</a> : 登出中 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ae2c63b8bae1b189b3b6e09bf8d3058b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2c63b8bae1b189b3b6e09bf8d3058b9">&#9670;&nbsp;</a></span>getUserId()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* JCClient::getUserId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获得用户标识</p>
<p>返回的用户标识就是用户在调用 <a class="el" href="class_j_c_client.html#a580669b0424bf7e22db3ccbe059dddba">login</a> 方法时传入的 userId 参数，需要注意的是只有用户状态为登录中或已登录才能获取到值，其他状态将返回空字符串</p>
<dl class="section return"><dt>返回</dt><dd>用户标识 </dd></dl>

</div>
</div>
<a id="a580669b0424bf7e22db3ccbe059dddba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a580669b0424bf7e22db3ccbe059dddba">&#9670;&nbsp;</a></span>login()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool JCClient::login </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>userId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>serverAddress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> *&#160;</td>
          <td class="paramname"><em>loginParam</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>登录 Juphoon Cloud 平台</p>
<p>只有登录成功后才能进行平台上的各种业务</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">userId</td><td>用户名，长度在 64 字节以内的字符串。以下为支持的字符集范围（共 66 个字符）：<ul>
<li>26 个小写英文字母 a-z</li>
<li>26 个大写英文字母 A-Z</li>
<li>10 个数字 0-9</li>
<li>'+'，'-'，'_'，'.'。另外 '-'，'_'，'.' 这三个字符不能处于用户名的第一位 </li>
</ul>
</td></tr>
    <tr><td class="paramname">password</td><td>密码，不能为 NULL 或 ""，长度不能超过 128 字符 </td></tr>
    <tr><td class="paramname">serverAddress</td><td>登录服务器地址，默认地址为 <a href="http:cn.router.justalkcloud.com:8080">http:cn.router.justalkcloud.com:8080</a>（国内环境）。如果是海外用户需要设置为 <a href="http:intl.router.justalkcloud.com:8080">http:intl.router.justalkcloud.com:8080</a>（国际环境） </td></tr>
    <tr><td class="paramname">loginParam</td><td>登录参数，传 NULL 则按默认值。一般不需要设置，如需设置请询问客服，详细定义见 <a class="el" href="class_j_c_client_login_param.html">JCClientLoginParam</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>调用是否成功<ul>
<li>true：正常执行调用流程，登录结果通过 <a class="el" href="class_j_c_client_callback.html#ab2deb2e2d3c95f848d9dc2baa7c6daff">onLogin</a> 通知</li>
<li>false：调用失败，不会收到 <a class="el" href="class_j_c_client_callback.html#ab2deb2e2d3c95f848d9dc2baa7c6daff">onLogin</a> 通知 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="abac015a13078c84b06afac69dcd392ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abac015a13078c84b06afac69dcd392ff">&#9670;&nbsp;</a></span>logout()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool JCClient::logout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>登出 Juphoon Cloud 平台</p>
<p>登出后不能进行平台上的各种业务</p>
<dl class="section return"><dt>返回</dt><dd>调用是否成功<ul>
<li>true：正常执行调用流程，登出结果通过 <a class="el" href="class_j_c_client_callback.html#a28b0af754882f73b08bb6ea65b03f81c">onLogout</a> 通知</li>
<li>false：调用失败，不会收到 <a class="el" href="class_j_c_client_callback.html#a28b0af754882f73b08bb6ea65b03f81c">onLogout</a> 通知 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="adf9a101b1cb0744d7857570fd97847af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf9a101b1cb0744d7857570fd97847af">&#9670;&nbsp;</a></span>setDisplayName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void JCClient::setDisplayName </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>displayName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置自己的昵称</p>
<p>在调用 <a class="el" href="class_j_c_call.html#a6ba5c96565197a35b847a5d8452cbc66">call</a> 发起呼叫时，调用 <a class="el" href="class_j_c_message_channel.html#a7c46e2cdda1265a58c980fc019529031">sendMessage</a>、<a class="el" href="class_j_c_message_channel.html#a2de75f8da09b6dc92ef404aa236b0394">sendFile</a> 发送消息时、 调用 <a class="el" href="class_j_c_media_channel.html#acfdb1da52955cf8b01d95527eb28890b">join</a> 加入频道时，都会将自己的昵称发送给其他用户。以下是各场景获取对方昵称的方法：<br  />
</p><ul>
<li>通话场景获取对方昵称：<a class="el" href="class_j_c_call_item.html#aaac03b2d0dd98cb46f30d8f9de46cdd8">getDisplayName</a></li>
<li>消息场景获取对方昵称：<a class="el" href="class_j_c_message_channel_item.html#acf9471de41905e577b3880e385e88fce">displayName</a></li>
<li>会议频道场景获取对方昵称：<a class="el" href="class_j_c_media_channel_participant.html#a4b503cddc8ba7e3d62f06e6cf2c7c558">getDisplayName</a></li>
</ul>
<dl class="section note"><dt>注解</dt><dd>每次调用 create 方法初始化 SDK 后都需要重新设置</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">displayName</td><td>要设置的昵称 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>SDK/all/include/<a class="el" href="_j_c_client_8h_source.html">JCClient.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
